﻿using System;
using System.Windows.Input;
using Microsoft.Phone.Controls;

namespace WP7CattoFreeApp
{
    public partial class Profile : PhoneApplicationPage
    {
        public Profile()
        {
            InitializeComponent();

            setupInputScopeTextBox();

        }

        #region "Events"
        /// <summary> Button to navigate to the Home page
        /// Btn Home
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnHome_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
        }

        #endregion

        #region "Methods"

        /// <summary> Setup Input Scope 4 text boxes
        /// Setup Input Scope
        /// </summary>
        void setupInputScopeTextBox()
        {
            // chat name on screen keypad customized
            txtboxNickName.InputScope = new InputScope()
            {
                Names = { new InputScopeName()  
                          { NameValue = InputScopeNameValue.NameOrPhoneNumber }  
                        }
            };

            // email address on screen keypad customized
            txtboxEmail.InputScope = new InputScope()
            {
                Names = { new InputScopeName()  
                          { NameValue = InputScopeNameValue.EmailSmtpAddress }  
                        }
            };

            // numberpad on screen keypad customized
            txtboxPhone.InputScope = new InputScope()
            {
                Names = { new InputScopeName()  
                          { NameValue = InputScopeNameValue.TelephoneNumber }  
                        }
            };

            // URL on screen keypad customized
            txtboxURL.InputScope = new InputScope()
            {
                Names = { new InputScopeName()  
                          { NameValue = InputScopeNameValue.Url }  
                        }
            };

        }
        #endregion



    }
}